<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="../js/mui.min.js"></script>
    <link href="../css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="../css/style.css" />
    <link rel="stylesheet" href="../css/swiper.css" />
    <link rel="stylesheet" href="../css/iconfont.css" />   
    <style>
		.scroll {height:30px;width:60%;max-width:640px;overflow:hidden;color: #000000;display:inline-block;position: relative;position: absolute;left: 120px;top:6px;}
		.scroll ul {width:100%;position:absolute;left:0;top:0;}
		.scroll li {height:30px;line-height:30px;}
	    .scroll li a{display: block;color: #666666;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;font-size: 14px;}
	    .swiper-wrapper img{height: 150px!important;}
		.icon {
			width: 1em;
			height: 1em;
			vertical-align: -0.15em;
			fill: currentColor;
			overflow: hidden;
		}
    </style>
    <script type="text/javascript" src="../js/swiper.min.js" ></script>
    <script type="text/javascript" src="../js/jquery-1.8.0.min.js" ></script>
    <script type="text/javascript" src="../js/common.js" ></script>
    <script type="text/javascript" src="../js/session.js" ></script>
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<body>
	
	<div class="mui-content">
		<!--个人中心-->
		<div id="gerenzhongxin">
			<div class="geren-ding">
				<h1 style="height: 20px;"></h1>
				<div class="geren-info">
					<div class="geren-left" id="touxiang"><img  src="../images/my-icon.png"></div>
					<div class="geren-right">
						<div id="nicheng">昵称</div>
						<div id="shoujihao">未知</div>
						<img class="shezhi" src="../images/shezhi.png"/>
					</div>
				</div>
			</div>
			<div class="kong"></div>
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell gouwu">
					<a data-href="../shopping/wode.html" class="mui-navigate-right">我的购物</a>
				</li>
				<li class="mui-table-view-cell qianbao">
					<a data-href="../qianbao/index.html" class="mui-navigate-right">我的钱包</a>
				</li>
			</ul>
			<div class="kong"></div>
			<!--<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell guanli">
					<a data-href="../guanli/diantilist.html" class="mui-navigate-right">电梯管理</a>
				</li>
			</ul>
			<div class="kong"></div>-->
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell ruzhu">
					<a id="ruzhu" class="mui-navigate-right"></a>
				</li>
			</ul>
				<div class="kong"></div>
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell guanyu">
					<a data-href="aboutus.html" class="mui-navigate-right">关于</a>
				</li>
				<li class="mui-table-view-cell tuichu">
					<a  class="mui-navigate-right">退出</a>
				</li>
			</ul>
		</div>
	</div>
	
	    <footer>
			<nav class="mui-bar mui-bar-tab footer">
				<!--<a class="mui-tab-item mui-active" href="#tabbar">
					<span class="mui-icon">
						<svg class="icon" aria-hidden="true">
							<use xlink:href="#icon-fanhuishouye"></use>
						</svg>
					</span>
				<span class="mui-tab-label">首页</span>
				</a>-->
				<a class="mui-tab-item mui-active " id="shouye" data-href="index.html">
					<span class="mui-icon iconfont icon-shouye"></span>
					<span class="mui-tab-label">首页</span>
				</a>
				<a class="mui-tab-item" >
					<span class="mui-icon "></span>
					<span class="mui-tab-label"></span>
				</a>
				
				<a class="mui-tab-item" id="wode" data-href="myself.html">
					<span class="mui-icon iconfont icon-Personal-active" ></span>
					<span class="mui-tab-label">我的</span>
				</a>
			</nav>	
		</footer>	
		<script>
            $(function(){
				 //判断有没有登录
				var userid=getCookie("userid");			
	            if(userid==""||userid==null){
	            	alert("您还没有登录，请先登录！")
	            	location.href="login.html"
//	            	mui.openWindow({url:"login.html"})
	            }else{
	            	//	获取个人资料
	            	// $("footer").load("index-footer2.html");
					mui("footer").on("tap","a[data-href]",function(){
//						mui.openWindow({url:$(this).attr("data-href")})
		              location.href=$(this).attr("data-href");
					})
					mui(".mui-content").on("tap","a[data-href]",function(){
//						mui.openWindow({url:$(this).attr("data-href")})
                        location.href=$(this).attr("data-href");
					})
					mui(".mui-content").on("tap",".shezhi",function(){
						mui.openWindow({url:"../stting/setting.html"})
//						location.href="../stting/setting.html"
					})
	            	var  data={};
	            	data.member_id=userid;
		            $.post(net+"public/index.php?s=api/member",data,function(res){
		            	if(res.code=="200"){
		            		if(res.result.member_avatar!=null&&res.result.member_avatar!=""){
		            			$("#touxiang").html('<img  src="'+net+res.result.member_avatar+'">')
		            		}
		            		if(res.result.member_mobile!=""&&res.result.member_mobile!=null){
		            			$("#shoujihao").html("手机号："+res.result.member_mobile)
		            		}
		            		
		            		if(res.result.member_username!=""&&res.result.member_username!=null){
		            			$("#nicheng").html(res.result.member_username)
		            		}
		            		if(res.result.store_id!=""&&res.result.store_id!=null){
		            			$("#ruzhu").attr("data-href","../shopping/ruzhuinfo.html?id="+res.result.store_id);
		            			$("#ruzhu").html("入驻详情")
		            		}else{
		            			$("#ruzhu").attr("data-href","../shopping/ruzhu.html");
		            			$("#ruzhu").html("申请入驻")
		            			
		            		}
		            	}
		            })
		           mui(".mui-content").on("tap",".tuichu",function(){
		            	var param={};
		            	$.post(net+"/public/index.php?s=api/login/logout",param,function(res){
			            	if(res.code=="200"){
			            		alert(res.message);
			            		deleteCookie("userid");
			            		deleteCookie("work");			            
			            		location.href="login.html";
			            	}
			            })
                        
		            })
	            }
        })
		</script>
		<script>
			
		</script>	
		
</body>
</html>